﻿using UnityEngine;
using System.Collections;

///<summary>
/// Collide with ennemies for life counting
///</summary>
public class PlayerBase : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    public void OnTriggerEnter(Collider collider)
    {
        if(collider.gameObject.tag == "Ennemy_ground" || collider.gameObject.tag == "Ennemy_air")
        {
            EventManager<GameObject>.Raise("ennemy reach base", collider.gameObject);
            Destroy(collider.gameObject);
        }
    }
}
